Skip to content

Address energy outside of an HVAC season or during unavailable period#2151

Merged
shorowit merged 59 commits intomasterfrom
address-crankcase-defrost-pan-warning
Apr 24, 2026
Merged

Address energy outside of an HVAC season or during unavailable period#2151
shorowit merged 59 commits intomasterfrom
address-crankcase-defrost-pan-warning

Conversation

@joseph-robertson
Copy link
Copy Markdown
Collaborator

@joseph-robertson joseph-robertson commented Jan 22, 2026

Pull Request Description

Addresses #2149, model the crankcase heater via EMS so that it can be disabled during power outages.

Checklist

Not all may apply:

  • Schematron validator (EPvalidator.sch) has been updated
  • Sample files have been added/updated (openstudio tasks.rb update_hpxmls)
  • Tests have been added/updated (e.g., HPXMLtoOpenStudio/tests/test*.rb and/or workflow/tests/test*.rb)
  • Documentation has been updated
  • Changelog has been updated
  • openstudio tasks.rb update_measures has been run
  • No unexpected changes to simulation results of sample files

@joseph-robertson joseph-robertson changed the title Address crankcase/defrost/pan energy outside of an HVAC season or heating unavailable period Address energy outside of an HVAC season or during unavailable period Jan 22, 2026
Comment thread HPXMLtoOpenStudio/resources/hvac.rb Outdated
Comment thread HPXMLtoOpenStudio/resources/hvac.rb Outdated
Comment thread workflow/tests/base_results/results_simulations_energy.csv Outdated
joseph-robertson and others added 5 commits March 31, 2026 10:51
…HPXML into address-crankcase-defrost-pan-warning

# Conflicts:
#	HPXMLtoOpenStudio/measure.xml
#	ReportSimulationOutput/measure.xml
#	workflow/tests/base_results/results_simulations_misc.csv
@shorowit shorowit mentioned this pull request Apr 7, 2026
7 tasks
shorowit and others added 2 commits April 20, 2026 11:59
…HPXML into address-crankcase-defrost-pan-warning

# Conflicts:
#	HPXMLtoOpenStudio/measure.xml
#	ReportSimulationOutput/measure.xml
#	workflow/tests/base_results/results_simulations_misc.csv
Copy link
Copy Markdown
Contributor

@shorowit shorowit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks pretty good in general. I ran some tests manually and results were as expected. I did have just a few small questions/comments:

Comment thread HPXMLtoOpenStudio/resources/hvac.rb Outdated
Comment thread HPXMLtoOpenStudio/resources/hvac.rb
Comment thread HPXMLtoOpenStudio/resources/hvac.rb Outdated
Comment on lines +4838 to +4839
program.addLine("ElseIf T_out < #{min_oat_compressor}")
program.addLine(" Set #{crankcase_heater_energy_oe_act.name} = #{heat_pump.crankcase_heater_watts}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not immediately understanding why this ElseIf is needed (and why it doesn't use the htg/clg availability sensors like above). Can you explain?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For multispeed objects, it's possible for the cycling ratio to be reported as 1 when the compressor is locked out.

Here is a snippet without the ElseIf for base-hvac-air-to-air-heat-pump-2-speed.xml (CompressorLockoutTemperature=-17.777C) :
image

I'll look into the htg/clg availability sensors question.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was missing the htg/clg availability sensors on the compressor lockout ElseIf line. Good catch. 031529b

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the program here to avoid the possibility of inconsistent logic between the two paths. The program felt more complicated than it needed to be. Now it makes more sense to me.

Comment thread HPXMLtoOpenStudio/resources/output.rb
Comment thread HPXMLtoOpenStudio/resources/hvac.rb Outdated
Comment thread HPXMLtoOpenStudio/resources/output.rb Outdated
Comment thread Changelog.md Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR addresses #2149 by modeling heat pump crankcase heater energy via EMS so it can be disabled during power outages/unavailable periods, and updates sample files, documentation, and test baselines accordingly.

Changes:

  • Adds EMS-based crankcase heater energy modeling and updates reporting to attribute it to heating vs cooling end uses.
  • Updates/extends workflow sample files and baseline results for new “power outage” and “hvac seasons” scenarios.
  • Removes/updates warnings/documentation that previously stated HVAC energy couldn’t be eliminated during unavailable periods/outside seasons.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
HPXMLtoOpenStudio/resources/hvac.rb Implements EMS crankcase heater modeling and removes direct E+ crankcase heater configuration.
HPXMLtoOpenStudio/resources/output.rb Routes crankcase heater energy reporting through EMS “OtherEquipment” and updates API usage.
HPXMLtoOpenStudio/tests/test_hvac.rb Expands heat pump defrost/pan heater test to also validate crankcase heater EMS.
HPXMLtoOpenStudio/resources/schedules.rb + docs/source/workflow_inputs.rst Removes/adjusts warnings/docs now that EMS can eliminate HVAC crankcase energy in unavailable periods.
workflow/sample_files/*.xml + workflow/tests/base_results/*.csv Adds scenarios and updates baselines to reflect new behavior.
ReportSimulationOutput/measure.rb Ensures EMS lag adjustment also applies to crankcase heater “OtherEquipment”.
Comments suppressed due to low confidence (2)

HPXMLtoOpenStudio/resources/hvac.rb:5310

  • The unit-multiplier scaling for crankcase_heater_watts was removed for both cooling systems and heat pumps, but crankcase heater power is still used to drive EMS “OtherEquipment” power (hvac_system.crankcase_heater_watts). This will under-scale crankcase heater energy in multifamily/unit-multiplier runs. Add back scaling of *_sys.crankcase_heater_watts here (or alternatively, scale inside apply_crankcase_heater_ems_program using number_of_units/unit multiplier) so results remain consistent with other HVAC power terms.
  def self.apply_unit_multiplier(hpxml_bldg, hpxml_header)

HPXMLtoOpenStudio/resources/hvac.rb:4990

  • apply_defrost_ems_program now assumes an outdoor drybulb EMS sensor already exists (and is tagged via additionalProperties), but it doesn’t create the sensor or validate that tout_db_sensor was found before later using it. This creates a hidden coupling to the call site and can fail at runtime if the sensor wasn’t created (e.g., if the function is reused from another code path). Consider either (a) creating the sensor here when not found, or (b) raising a clear error if tout_db_sensor is nil with guidance on the required setup.
    )

    # Sensors
    tout_db_sensor = model.getEnergyManagementSystemSensors.find { |s| s.additionalProperties.getFeatureAsString('ObjectType').to_s == Constants::ObjectTypeOATDrybulbSensor }

    htg_coil_rtf_sensor = Model.add_ems_sensor(
      model,
      name: "#{htg_coil.name} rtf s",
      output_var_or_meter_name: 'Heating Coil Runtime Fraction',
      key_name: htg_coil.name
    )

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread HPXMLtoOpenStudio/resources/hvac.rb
Comment thread HPXMLtoOpenStudio/resources/hvac.rb
Comment thread HPXMLtoOpenStudio/resources/hvac.rb
Comment thread HPXMLtoOpenStudio/resources/hvac.rb Outdated
shorowit and others added 7 commits April 22, 2026 12:49
…HPXML into address-crankcase-defrost-pan-warning

# Conflicts:
#	HPXMLtoOpenStudio/measure.xml
…HPXML into address-crankcase-defrost-pan-warning

# Conflicts:
#	HPXMLtoOpenStudio/measure.xml
#	workflow/tests/base_results/results_simulations_bills.csv
#	workflow/tests/base_results/results_simulations_energy.csv
#	workflow/tests/base_results/results_simulations_loads.csv
#	workflow/tests/base_results/results_simulations_misc.csv
…EL/OpenStudio-HPXML into address-crankcase-defrost-pan-warning
…HPXML into address-crankcase-defrost-pan-warning

# Conflicts:
#	HPXMLtoOpenStudio/measure.xml
@shorowit shorowit merged commit 045f84b into master Apr 24, 2026
0 of 4 checks passed
@shorowit shorowit deleted the address-crankcase-defrost-pan-warning branch April 24, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants